#迭代器
it = iter([1,2,3,4,5])
for i in it:
    print(i)



#生成器

def func():
    print(123456)
    yield 999  #yield也有返回的意思


ret = func()
print(ret)
print(next(ret))